package Q1;
import java.util.Scanner;

public class countStrTest {
    public static void main(String[] args) {
        System.out.println("请问是否要自定义输入想要统计的字符串？y/n");
        Scanner sc = new Scanner(System.in);
        String input = sc.next().toLowerCase();
        if (input.equals("n")){
            countStr test = new countStr();
            System.out.println(test.toString());
        }
        else{
            System.out.println("请输入想要统计的字符串");
            String str = sc.next();
            countStr test = new countStr(str);
            System.out.println(test.toString());
        }
    }
}
